import Vue from "vue";
import VueRouter from "vue-router";

import Users from "../views/Users";
import UserAdd from "../views/Users/UserAdd";
import UserUpdate from "../views/Users/UserUpdate";

Vue.use(VueRouter);

export default new VueRouter({
  mode: "history",
  routes: [
    {
      name: "Users",
      path: "/users",
      component: Users,
    },
    {
      name: "UserAdd",
      path: "/user/add",
      component: UserAdd,
    },
    {
      name: "UserUpdate",
      path: "/user/update",
      component: UserUpdate,
    },
    {
      path: "*",
      redirect: "/users",
    },
  ],
});
